function hasCysle(head){
    if(head==null || head.next==null) return false;
    // 定义快慢指针
    let slower=head;
    let faster=head;
    while(faster!=null&&faster.next!=null){
        slower=slower.next;
        faster=faster.next.next;
        if(slower==faster){
            return true
        }
    }
    return false;
}